#include "Core\NervusSharedHeader.h"
#include "Render\CSprite.h"

namespace Nervus {
	namespace Render {
		class D3D11Sprite : public Sprite {
			friend class D3D11RenderSystem;
			friend class D3D11Mesh;

		private:
			D3D11RenderSystem* mRenderSystem;
			vector<MeshVertex> mVertices;

			ID3D11Buffer* mVertexBuffer;
			ID3D11Buffer* mIndexBuffer;

			ID3D11ShaderResourceView* mTextureView;
			ID3D11SamplerState* mTexSamplerState;
			ID3D11Texture2D* mTexture;

			D3D11Sprite(D3D11RenderSystem* renderer, D3DXVECTOR2 pos, Texture*);
			~D3D11Sprite();

			bool loadSprite();
		public:
			void renderSprite();
		};
	}
}